package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Travel;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TravelMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Travel record);

    Travel selectByPrimaryKey(Long id);

    List<Travel> selectAll();

    int updateByPrimaryKey(Travel record);

    List<Travel> selectForList(QueryObject qo);

    void updateState(Travel travel);

    List<Travel> selectContentByKeyword(QueryObject qo);

    int selectLoveForId(Long typeId);

    void updateLove(@Param("typeId") Long typeId, @Param("loveNum") int loveNum);

    List<Travel> selectByCollectId(List<Integer> collectId);

    int selectCollectNum(Long collectId);

    void updateCollectNum(@Param("collectId") Long collectId, @Param("collectNum") int collectNum);
}